package com.sgb.kjwl.api.net;

import com.sgb.kjwl.BuildConfig;
import com.sgb.kjwl.api.service.BusinessManagementAPI;
import com.sgb.kjwl.api.service.GoodsAPI;
import com.sgb.kjwl.api.service.MaterialAPI;
import com.sgb.kjwl.api.service.MemberPriceApi;
import com.sgb.kjwl.api.service.OrderAPI;
import com.sgb.kjwl.api.service.SelfGoodsPublishAPI;
import com.sgb.kjwl.api.service.ShopCarOrderAPI;
import com.sgb.kjwl.api.service.ShoppingCarAPI;
import com.sgb.kjwl.api.service.GoodsReleasedAPI;
import com.sgb.kjwl.api.service.MaterialAPI;
import com.sgb.kjwl.api.service.OrderAPI;
import com.sgb.kjwl.api.service.ProductInquiryAPI;
import com.sgb.kjwl.api.service.SelfGoodsPublishAPI;
import com.sgb.kjwl.api.service.ShopCarOrderAPI;
import com.sgb.kjwl.api.service.ShoppingCarAPI;
import com.sgb.kjwl.api.service.ShoppingCarNewOrderAPI;
import com.sgb.kjwl.api.service.TransAPI;
import com.sgb.net.core.BaseCompatibleNet;

import okhttp3.OkHttpClient;

/**
 * 商品网络请求 网络请求 retrofit2 API
 * 注意：商品涉及大体的api在迁移时可能存在替换不完整的情况，需要严苛进行，迁移的API会进行注释,具体如下：
 * @see GoodsAPI
 * @see SelfGoodsPublishAPI
 * @see BusinessManagementAPI    仓储管理相关API
 * @see MaterialAPI
 * @see ShoppingCarAPI
 * @see ShopCarOrderAPI
 * @see OrderAPI
 * @see TransAPI
 *
 * 商品API分类包含(根据后端api接口分类整理)：
 * 1.商品发布；2.商品询价；
 *
 * @author cyj
 */
public class GoodsNet extends BaseCompatibleNet {

    /** 商品发布 */
    private final GoodsReleasedAPI goodsReleasedAPI = getService(GoodsReleasedAPI.class, BuildConfig.BASE_URL_SP);
    /** 商品API */
    private final GoodsAPI goodsAPI = getService(GoodsAPI.class, BuildConfig.BASE_URL_SP);
    /** 商品材料API */
    private final MaterialAPI materialAPI = getService(MaterialAPI.class, BuildConfig.BASE_URL_SP);
    /** 商品询价API */
    private final ProductInquiryAPI productInquiryAPI = getService(ProductInquiryAPI.class, BuildConfig.BASE_URL_SP);
    /** 商品订单，采购单相关API */
    private final ShoppingCarNewOrderAPI shoppingCarNewOrderAPI = getService(ShoppingCarNewOrderAPI.class, BuildConfig.BASE_URL_SP);
    /**会员价相关**/
    private final MemberPriceApi memberPriceApi = getService(MemberPriceApi.class,BuildConfig.BASE_URL_SP);
    /**
     * Builder 网络配置处理
     * @see OkHttpClient.Builder    所有的基于okhttp3网络配置属性可以查看这里
     * @param builder
     */
    @Override
    protected void handleBuilder(OkHttpClient.Builder builder) {}

    /**
     * 获取商品发布API接口对象
     * @return    GoodsReleasedAPI
     */
    public GoodsReleasedAPI getGoodsReleasedAPI() {
        return goodsReleasedAPI;
    }

    /**
     * 获取商品API接口对象
     * @return    GoodsAPI
     */
    public GoodsAPI getGoodsAPI() {
        return goodsAPI;
    }

    /**
     * 获取商品API接口对象
     * @return    GoodsAPI
     */
    public MaterialAPI getMaterialAPI() {
        return materialAPI;
    }

    /**
     * 获取商品询价API接口对象
     * @return    ProductInquiryAPI
     */
    public ProductInquiryAPI getProductInquiryAPI() {
        return productInquiryAPI;
    }

    /** 商品订单，采购单相关API */
    public ShoppingCarNewOrderAPI getShoppingCarNewOrderAPI() {
        return shoppingCarNewOrderAPI;
    }

    /** 会员价**/
    public MemberPriceApi getMemberPriceApi(){return  memberPriceApi;}
}
